//
//  receiveGiftGetStorage.m
//  tcpoctest
//
//  Created by gump on 5/21/13.
//  Copyright (c) 2013 gump. All rights reserved.
//

#import "receiveGiftGetStorage.h"

#import "giftStroageDataSource.h"

#import "giftStroageDataInfo.h"

@implementation receiveGiftGetStorage

-(void)processreceive
{
    //返回 26char(1),5char(1),用户名长度char(1),
    //用户名char(x),[礼物ID长度char(1),礼物idchar(x),
    //数量长度char(1),数量char(x)]*n
    
    [[DataControl shareControl].giftStroageDS delAllArr];
    
    [logicsb ReadUnencodeString];
    
    while (logicsb.mrestLength > 0) {
        giftStroageDataInfo *gsinfo = [[giftStroageDataInfo alloc] init];
        
        gsinfo.strgiftid = [logicsb ReadUnencodeString];
        gsinfo.strGiftCount = [logicsb ReadUnencodeString];
        
        [[DataControl shareControl].giftStroageDS addGiftStroageInfo:gsinfo];
    }
    
    [[DataControl shareControl].UICommendDS addUICommand:UC_REFRESHCURVIEW];
    
    [self ShowLog];
}

@end
